<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box1{
            width: 925px;
            height: 922px;
            background-color: darkblue;
            display:block;
            background-color: red;
        }
         .a{
        width:300px;
        height:300px;
        background-color: darkmagenta;
          color: white;
          text-align: center;
          line-height: 300px;
          float: left;
          margin: 2px;
          border: 2px solid green;
        }
        .box2{
          width:912px;
          height:912px;
          background-color: darkblue;
          display: flex;
          flex-wrap:wrap;
          justify-content:center;
         
      }
      .box2 div {
          width:300px;
          height:300px;
          background-color: gray;
          color: white;
          text-align: center;
          border: 1px solid red;
          line-height: 300px;
          
      }
    </style>
</head>
<body>
    <div class="box1">
        <div class="a">1</div>
        <div class="a">2</div>
        <div class="a">3</div>
        <div class="a">4</div>
        <div class="a">5</div>
        <div class="a">6</div>
        <div class="a">7</div>
        <div class="a">8</div>
        <div class="a">9</div>
    </div>
    <div class="box2">
        <div>1</div>
        <div>2</div>
        <div>3</div>
        <div>4</div>
        <div>5</div>
        <div>6</div>
        <div>7</div>
        <div>8</div>
        <div>9</div>
         </div>
</body>
<html>